package xuegao.study.mall.order.controller;


import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import xuegao.study.mall.common.domain.portal.PromotionProduct;
import xuegao.study.mall.order.service.PmsProductService;

import java.util.List;

/**
 * 商品相关信息
 */
@RestController
@RequestMapping(value = "/product")
public class PmsProductController {

    @Autowired
    private PmsProductService pmsProductService;

    @ApiOperation("获取商品优惠信息")
    @GetMapping(value = "productPromotionInfo")
    List<PromotionProduct> getPromotionProduct(@RequestParam("productIds") List<Long> productIds) {
        return pmsProductService.getPromotionProduct(productIds);
    }
}
